(set-logic HO_ALL)
(set-info :status sat)
(set-option :debug-check-models true)
(declare-const E (Bag (Tuple Int Int Int Int Int Int Int Int Int)))
(declare-const D (Bag (Tuple Int Int)))
(declare-const r (-> (Tuple Int Int Int Int Int Int Int Int Int) (Tuple Int Int Int Int Int Int Int Int Int Int Int)))
(declare-const f (-> (Tuple Int Int Int Int Int Int Int Int Int Int Int) Int))
(declare-const p (-> (Tuple Int Int Int Int Int Int Int Int Int) Bool))
(declare-const q1 (Bag Int))
(declare-const q2 (Bag Int))
(assert (= q1 (bag.map f (bag.map r ((_ table.project 0 1 1 0 0 0 0 0 0) (bag.filter p E))))))
(assert (= q2 (bag.map f (bag.map r (bag.difference_remove E ((_ table.project 0 1 4 0 0 0 0 0 0) (table.product D E)))))))
(assert (distinct q1 q2 ))
(check-sat)
